import { useSelector } from 'react-redux'
import type { StateType } from '../store'
import { UserSliceType } from '../store/userReducer'

export default function useGetUserInfo() {
  const { username, nickname } = useSelector<StateType>(state => state.user) as UserSliceType

  return { username, nickname }
}
